<template>
    <!--会签管理-我的提交列表-材料结算详情弹窗-->
    <j-modal
      :title="title"
      :width="width"
      :visible="visible"
      switchFullscreen
      @ok="handleOk"

      @cancel="handleCancel"
      :cancelButtonProps="{ class:{'jee-hidden': disableSubmit1} }"
      :okButtonProps="{ class:{'jee-hidden': disableSubmit1} }"
      okText="确定"
      >
      <wt-shezhiaddshenpiren-form ref="realForm"  :disabled="disableSubmit" @ok="submitCallback"></wt-shezhiaddshenpiren-form>

    </j-modal>
  </template>

  <script>

    import WtShezhiaddshenpirenForm from './WtShezhiaddshenpirenForm'

    export default {
      name: 'WtShenpiModal',

      components: {
        WtShezhiaddshenpirenForm

      },
      data () {
        return {
          title:'',
          width:800,
          visible: false,
          disableSubmit: false,
          disableSubmit1: false,
          privacyDialogShow:false,
        }
      },
      methods: {
        confirmPrivacy(){
				// console.log('同意了用户协议')
				// console.log(this.privacyDialogShow)l
				this.privacyDialogShow = false
				// console.log(this.privacyDialogShow)

			},
			cancelPrivacy(){
				// console.log('拒绝了用户协议')
				this.privacyDialogShow=false
			},
        add (type,record) {
          this.visible=true
          this.$nextTick(()=>{
            this.$refs.realForm.add(type,record);
          })
        },
        edit (type,record,obj) {
          this.visible=true
          this.$nextTick(()=>{
            this.$refs.realForm.edit(type,record,obj);
          })
        },
        close () {
          this.$emit('close');
          this.visible = false;
        },
        handleOk () {
          this.$refs.realForm.submitForm();
          this.visible = false;
        },
        submitCallback(){
          console.log(23)
          this.$emit('ok');
        },
        handleCancel () {
         this.close()
        }
      }
    }
  </script>